export const state = () => ({
  err:1,
  msg:'未登录',
  token:'',
  data:{}
})

export const mutations = {
  M_UPDATE_USER(state,paylod){
    state.err = paylod.err
    state.msg = paylod.msg
    state.data = paylod.data
    state.token = paylod.token
  }
}

export const actions = {
  A_UPDATE_USER({commit,user},payload){
    //异步处理
    commit('M_UPDATE_USER',payload)
  }
}